<?php
/* @var $this InstrumentController */
/* @var $model InstrumentDate */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
    'id'=>'instrument-date-form',
    'enableAjaxValidation'=>false,
)); ?>

    <p class="note">Fields with <span class="required">*</span> are required.</p>

    <?php echo $form->errorSummary($model); ?>

    <div class="row">
    <?php echo $form->labelEx($model,'start_date');?>
    <?php $this->widget('application.extensions.timepicker.EJuiDateTimePicker', array(
        'model'=>$model,
        'language'=>'zh_cn',
        'attribute'=>'start_date',
        'options' => array(
            'dateFormat'=>'yy-mm-dd',
            'changeMonth'=>true,
            'changeYear'=>true,
            'timeFormat'=>'',
        ),
    ));
    ?>
        <?php echo $form->error($model,'start_date'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model,'end_date'); ?>
        <?php $this->widget('application.extensions.timepicker.EJuiDateTimePicker', array(
            'model'=>$model,
            'language'=>'zh_cn',
            'attribute'=>'end_date',
            'options' => array(
                'dateFormat'=>'yy-mm-dd',
                'changeMonth'=>true,
                'changeYear'=>true,
                'timeFormat'=>'',
            ),
        ));
        ?>
        <?php echo $form->error($model,'end_date'); ?>
    </div>

<div class="row">
        <?php echo $form->labelEx($model,'start_time');?>
        <?php echo $form->textField($model,'start_time');?>
        <?php echo $form->error($model,'start_time'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model,'end_time'); ?>
        <?php echo $form->textField($model,'end_time');?>
        <?php echo $form->error($model,'end_time'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model,'enabled'); ?>
        <?php echo $form->dropDownList($model,'enabled',array(InstrumentDate::ENABLED_TRUE=>'可预约',InstrumentDate::ENABLED_FALSE=>'不可预约')); ?>
        <?php echo $form->error($model,'enabled'); ?>
    </div>

    <div class="row buttons">
        <?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
    </div>

<?php $this->endWidget(); ?>

</div><!-- form -->
